import util.GuiImg;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Check extends JPanel implements ActionListener {
    /**
     * 查询
     */
    private Icon atmIcon9 = GuiImg.getIcon("/imgs/buttonSure.jpg");
    private JButton btnlogin9 = new JButton(atmIcon9);
    private Atm frame;
    private JTextField textField2;

    public Check(Atm frame) {
        this.frame = frame;
        this.setLayout(null);
        //余额显示框
        JLabel textlabel1 = new JLabel("您的余额为：");
        textlabel1.setBounds(200, 200, 100, 30);
        this.add(textlabel1);
        //余额显示框
        textField2 = new JTextField();
        textField2.setBounds(300, 200, 250, 30);
        this.add(textField2);
        //确认按钮
        this.setOpaque(false);
        btnlogin9.setBounds(330, 300, 100, 40);
        this.add(btnlogin9);
        btnlogin9.addActionListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == btnlogin9) {

            frame.switchPanel("菜单");
        }
    }

    public JTextField getTextField2() {
        return textField2;
    }

    public void setTextField2(JTextField textField2) {
        this.textField2 = textField2;
    }
}
